package com.example.demo.threadPool;

import com.example.demo.util.ThreadMdcUtil;
import org.slf4j.MDC;


/**
 * @Description:
 * @author: fanfan
 * @date: 2019/3/20 16:00
 */
public class ThreadWrapper extends Thread {
    public ThreadWrapper(Runnable task){
        Runnable wrap = ThreadMdcUtil.wrap(task, MDC.getCopyOfContextMap());
        wrap.run();
    }
}
